home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / comms / other / slrn / slrn_src / macros / tin-art.sl < prev    next >
Text File  |  1999-05-14  |  2KB  |  93 lines

  1.  
  2. !if (is_defined ("tin_group_next_unread")) () = evalfile ("tin-group.sl");
  3.  
  4. % Simple mappings
  5. definekey ("art_bob", "^R", "article");
  6. definekey ("art_eob", "$", "article");
  7.  
  8. define tin_art_next_unread_or_group ()
  9. {
  10.    if (get_header_flags () & HEADER_READ)
  11.      {
  12.     !if (header_next_unread ())
  13.       {
  14.          header_bob ();
  15.          if (get_header_flags () & HEADER_READ)
  16.            {
  17.           !if (header_next_unread ())
  18.             {
  19.                !if (is_article_visible ())
  20.              {
  21.                 art_quit ();
  22.                 tin_group_next_unread ();
  23.                 return;
  24.              }
  25.                
  26.                art_hide_article_window ();
  27.                return;
  28.             }
  29.            }
  30.       }
  31.      }
  32.    art_select_article ();
  33. }
  34. definekey ("tin_art_next_unread_or_group", "\t", "article");
  35.  
  36.  
  37. define tin_art_quit ()
  38. {
  39.    if (is_article_visible ())
  40.      {
  41.     art_hide_article_window ();
  42.     return;
  43.      }
  44.    
  45.    art_quit ();
  46. }
  47. definekey ("tin_art_quit", "q", "article");
  48. #ifndef OS2
  49. definekey ("tin_art_quit", "\e[D", "article");   %  left arrow
  50. definekey ("tin_art_quit", "\eOD", "article");
  51. definekey ("tin_art_quit", "^(kl)", "article");
  52. definekey ("art_select_article", "\e[C", "article");   %  right arrow
  53. definekey ("art_select_article", "\eOC", "article");
  54. definekey ("art_select_article", "^(kr)", "article");
  55. #else
  56. definekey ("tin_art_quit", "\xE0K", "article");   %  left arrow
  57. definekey ("art_select_article", "\xE0M", "article");   %  right arrow
  58. #endif
  59.  
  60. define tin_space_key_cmd ()
  61. {
  62.    !if (is_article_visible ())
  63.      {
  64.     ERROR_BLOCK
  65.       {
  66.          _clear_error ();
  67.          header_bob ();
  68.       }
  69.     call ("pagedn");
  70.     return;
  71.      }
  72.    
  73.    call ("article_pagedn");
  74. }
  75. definekey ("tin_space_key_cmd", " ", "article");
  76.  
  77. define tin_art_catchup_quit ()
  78. {
  79.    call ("catchup_all");
  80.    % Provide visual feedback that catchup worked
  81.    update ();
  82.    art_quit ();
  83. }
  84.  
  85. define tin_art_catchup_next ()
  86. {
  87.    tin_art_catchup_quit ();
  88.    tin_group_next_unread ();
  89. }
  90. definekey ("tin_art_catchup_quit", "c", "article");
  91. definekey ("tin_art_catchup_next", "C", "article");
  92.  
  93.